1 XZ=51 10 DIM B$(50),P(27),B(27),R(100),S(100) 20 POKE 788,52 100 PRINT "[147]";"" 101 POKE 53280,1:POKE 53281,1 110 PRINT " D A S H G A M E" 120 PRINT "" 130 PRINT "CHOOSE WHICH WAY THAT YOU WANT TO PLAY:" 140 PRINT "1. SOLITARE" 150 PRINT "2. AGAINST A FRIEND" 160 PRINT "3. AGAINST THE COMPUTER" 165 PRINT "4. GET INSTRUCTIONS" 170 PRINT " ";:INPUT CC 180 IF CC>4 OR CC<1 THEN 100 181 GOSUB 4000 182 PRINT "[147]";"" 185 PRINT "WHAT IS YOUR NAME";:INPUT N1$ 186 N1$=LEFT$(N1$,7) 190 ON CC GOTO 200,400,600,2600 200 REM SOLITARE 201 POKE 53280,15 210 GOSUB 5000 220 GOSUB 1000 230 T0=1:S9=0 240 PRINT "WHAT IS YOUR GUESS [157][157][157][157][157][157][157][157][157][157]";:INPUT L$ 250 GOSUB 2000 251 S9=S9+SS 255 PRINT " "; 257 PRINT "TURN";T0;N1$;" SCORE";SS;" TOTAL SCORE";S9 260 IF E=999 THEN 300 270 GOSUB 4000 280 T0=T0+1:GOTO 240 300 PRINT " "; 305 POKE 53280,2 310 PRINT "DO YOU WANT TO PLAY AGAIN[160]";N1$:INPUT L$ 315 E=0 320 IF MID$(L$,1,1)="Y" THEN 200 330 IF MID$(L$,1,1)<>"N" THEN 300 340 END 400 REM AGAINST A FRIEND 401 POKE 53280,15 405 PRINT "WHAT IS THE NAME OF YOUR FRIEND";:INPUT N2$ 406 N2$=LEFT$(N2$,7) 410 GOSUB 5000 420 GOSUB 1000 430 T0=1 435 PRINT " "; 440 PRINT "WHAT IS YOUR GUESS, ";N1$;" [157][157][157][157][157]";:INPUT L$ 450 GOSUB 2000 451 S9=S9+SS 455 PRINT " "; 457 PRINT "TURN";T0;N1$;" SCORE";SS;" TOTAL SCORE";S9 460 IF E=999 THEN 550 470 GOSUB 4000 475 PRINT " "; 480 PRINT "WHAT IS YOUR GUESS, ";N2$;" [157][157][157][157][157]";:INPUT L$ 490 GOSUB 2000 491 S8=S8+SS 495 PRINT " "; 497 PRINT "TURN";T0;N2$;" SCORE";SS;" TOTAL SCORE";S8 500 IF E=999 THEN 550 510 GOSUB 4000 520 T0=T0+1 530 GOTO 435 550 POKE 53280,2 560 PRINT "DO YOU WANT TO PLAY AGAIN ":INPUT L$ 570 E=0 572 IF MID$(L$,1,1)="Y" THEN 410 574 IF MID$(L$,1,1)<>"N" THEN 550 599 END 600 REM AGAINST THE COMPUTER 610 PRINT "[147]":POKE 53281,0:POKE 53280,0 620 PRINT ""; 630 PRINT "HOW DO YOU WANT THE COMPUTER TO PLAY" 640 PRINT " 1. EASY" 650 PRINT " 2. MEDIUM" 660 PRINT " 3. HARD" 670 PRINT " 4. VERY HARD" 680 PRINT " 5. EXPERT " 690 PRINT " ";:INPUT HH 695 REM IF HH=5 THEN 2500 700 IF HH<1 OR HH>5 THEN 600 701 IF S8=0 THEN 720 702 PRINT "[147]ENTER (1) FOR NEW SCORE" 703 PRINT " (2) FOR CUMULATIVE SCORE" 704 INPUT " ";SG 705 IF SG<1 OR SG>2 THEN 702 706 IF SG=2 THEN 720 707 S8=0:S9=0 720 GOSUB 5000 730 GOSUB 1000 740 IF HH=3 THEN GOSUB 5600 750 T0=1 760 PRINT "WHAT IS YOUR GUESS, ";N1$;" [157][157][157][157][157]";:INPUT L$ 770 GOSUB 2000 790 S9=S9+SS 800 PRINT " "; 810 PRINT "TURN";T0;N1$;SS;" TOTAL SCORE";S9 820 IF E=999 THEN 950 830 GOSUB 4000 835 PRINT " COMPUTER THINKING "; 840 IF HH>1 AND HH<4 THEN GOSUB 3100 850 IF HH=1 THEN GOSUB 3000 860 IF HH=4 THEN GOSUB 2320 865 IF HH=5 THEN GOSUB 3320 870 PRINT " COMPUTER GUESS, [157][157][157][157][157]";L$ 880 GOSUB 2000 890 S8=S8+SS 900 PRINT " "; 910 PRINT "TURN";T0;"COMPUTER";SS;" TOTAL SCORE";S8 920 IF E=999 THEN 950 930 GOSUB 4000 935 T0=T0+1 940 GOTO 760 950 POKE 53280,2 960 PRINT "DO YOU WANT TO PLAY AGAIN ";N1$:INPUT L$ 970 E=0 972 IF MID$(L$,1,1)="Y" THEN 600 974 IF MID$(L$,1,1)<>"N" THEN 960 999 END 1000 REM PRINT LAYOUT 1001 PRINT "[147]";""; 1005 L1=0:L2=1:PRINT " "; 1010 FOR T=1 TO N5 1020 L1=L1+LEN(B$(T)) 1030 IF L1>25 THEN 1080 1040 FOR D=1TOLEN(B$(T)):PRINT"-";:NEXT 1050 PRINT " "; 1060 L$(L2)=L$(L2)+" "+B$(T) 1061 A$(L2)=A$(L2)+" " 1065 FOR I=1 TO LEN(B$(T)):A$(L2)=A$(L2)+"*":NEXT 1070 NEXT T 1075 PRINT "";:RETURN 1080 L1=0:L2=L2+1 1090 PRINT"":PRINT " ";:GOTO 1020 1400 DIM B$(50),P(26),B(26),R(90) 2000 REM ADDING LETTERS 2010 PRINT "";""; 2011 SS=0 2012 IF P(ASC(L$)-64)=1 THEN 2310 2015 P(ASC(L$)-64)=1 2020 FOR T=1 TO L2 2025 PRINT ""; 2030 FOR J=1 TO LEN(L$(T )) 2040 IF L$=MID$(L$(T),J,1) THEN 2080 2045 PRINT ""; 2050 NEXT J 2060 PRINT"" 2070 NEXT T 2071 GOTO 2300 2080 PRINT L$; 2090 SS=SS+1:IFJ=1 THEN A$(T)=L$+MID$(A$(T),2,LEN$(A(T))) 2095 JJ=J 2100 IF J>1 THEN A$(T)=MID$(A$(T),1,J-1)+L$+MID$(A$(T),J+1,LEN(A$(T))) 2105 IF J=1 THEN Q=1:GOTO 2150 2110 FOR Q=J TO 1 STEP -1 2120 IF MID$(A$(T),Q,1)=" " THEN 2140 2130 NEXT Q 2135 Q=1 2140 IF MID$(L$(T),Q,1)<>" " THEN 2290 2150 FOR QQ=Q+1 TO LEN(L$(T)) 2160 IF MID$(L$(T),QQ,1)=" " THEN 2190 2170 IF MID$(L$(T),QQ,1)<>MID$(A$(T),QQ,1) THEN 2290 2180 NEXT QQ 2190 SS=SS+5 2200 FOR Q=1 TO L2 2210 IF A$(Q)<>L$(Q) THEN 2290 2220 NEXT Q 2230 SS=SS+5 2240 E=999 2290 GOTO 2050 2300 REM 2310 RETURN 2320 REM MOVE WITH HIGHEST POINTS 2321 SE=-1 2340 FOR MO=65 TO 90 2342 FOR Q=1 TO L2:C$(Q)=A$(Q):NEXT 2350 Q$=CHR$(MO) 2355 SS=0 2360 IF P(ASC(Q$)-64)=1 THEN 2485 2365 FOR T=1 TO L2 2370 FOR J=1 TO LEN(L$(T )) 2375 IF Q$=MID$(L$(T),J,1) THEN 2395 2380 NEXT J 2385 NEXT T 2390 GOTO 2485 2395 SS=SS+1:IFJ=1 THEN C$(T)=Q$+MID$(C$(T),2,LEN(C$(T))) 2400 IF J>1 THEN C$(T)=MID$(C$(T),1,J-1)+Q$+MID$(C$(T),J+1,LEN(C$(T))) 2405 IF J=1 THEN Q=1:GOTO 2435 2410 FOR Q=J TO 1 STEP -1 2415 IF MID$(C$(T),Q,1)=" " THEN 2430 2420 NEXT Q 2425 Q=1 2430 IF MID$(L$(T),Q,1)<>" " THEN 2480 2435 FOR QQ=Q+1 TO LEN(L$(T)) 2440 IF MID$(L$(T),QQ,1)=" " THEN 2455 2445 IF MID$(L$(T),QQ,1)<>MID$(C$(T),QQ,1) THEN 2480 2450 NEXT QQ 2455 IF NX=0 THEN SS=SS+5 2460 FOR Q=1 TO L2 2465 IF C$(Q)<>L$(Q) THEN 2480 2470 NEXT Q 2475 SS=SS+5 2480 GOTO 2380 2485 IF SS1 THEN C$(T)=MID$(C$(T),1,J-1)+Q$+MID$(C$(T),J+1,LEN(C$(T))) 3405 IF J=1 THEN Q=1:GOTO 3431 3410 FOR Q=J TO 1 STEP -1 3415 IF MID$(C$(T),Q,1)=" " THEN 3430 3420 NEXT Q 3425 Q=1 3430 IF MID$(L$(T),Q,1)<>" " THEN 3480 3431 NX=0 3435 FOR QQ=Q+1 TO LEN(L$(T)) 3440 IF MID$(L$(T),QQ,1)=" " THEN 3455 3445 IF MID$(L$(T),QQ,1)<>MID$(C$(T),QQ,1) THEN NX=NX+1 3450 NEXT QQ 3455 IF NX=0 THEN SS=SS+5 3456 IF NX=1 THEN SS=SS-7 3460 FOR Q=1 TO L2 3465 IF C$(Q)<>L$(Q) THEN 3480 3470 NEXT Q 3475 SS=SS+5 3480 GOTO 3380 3485 IF SS" " THEN 4030 4038 PRINT ""; 4039 PRINT " "; 4040 RETURN 5000 RESTORE:REM READING 5001 FOR T=1 TO 26:READB(T):NEXT 5002 FOR T=1 TO 10:L$(T)="": A$(T)="":NEXT 5003 FOR T=1 TO 26:P(T)=0:NEXT 5005 FOR T=1 TO 100:R(T)=0:NEXT 5010 PRINT "READING DATA" 5020 X=INT(RND(1)*XZ+1) 5030 FOR TT=1 TO X 5050 T=1 5060 READ B$(T) 5070 IF B$(T)="XX" THEN 5090 5080 T=T+1:GOTO 5060 5090 N5=T-1 5100 NEXT TT 5110 FOR T=1 TO N5 5120 FOR TT=1 TO LEN(B$(T)) 5130 R0=ASC(MID$(B$(T),TT,1))-64 5140 R(R0)=1 5150 NEXT TT 5160 NEXT T 5170 FOR T=1 TO 26 5180 IF R(T)=0 THEN P(T)=1 5190 NEXT T 5300 RETURN 5400 RESTORE:REM RESEARCH 5401 FOR T=1 TO 26:READB(T):NEXT 5410 PRINT "COMPUTER IS STUDYING" 5430 FOR TT=1 TO XZ 5450 T=1 5460 READ B$(T) 5470 IF B$(T)="XX" THEN 5490 5471 FOR OP=1 TO LEN(B$(T)) 5472 D$=MID$(B$(T),OP,1) 5473 R(ASC(D$))=R(ASC(D$))+1+5/LEN(B$(T)) 5474 NEXT OP 5480 T=T+1:GOTO 5460 5490 NEXT TT 5500 FOR T=1 TO 26 5501 BB=0:BN=0 5505 FOR RT=65 TO 90 5510 IF R(RT)